a, b = 1, 1
for _ in range(50):
    print(a)
    a, b = b, a + b

for i in range(100, 1000):
    a = i % 10
    b = i // 10 % 10
    c = i // 100
    if a ** 3 + b ** 3 + c ** 3 == i:
        print(i)

for i in range(1, 100):
    sum = 0
    for j in range(1, i):
        if i % j == 0:
            sum += j
    if sum == i:
        print(i)

for i in range(1, 100):
    for j in range(2, i):
        if i % j == 0:
            break
    else:
        print(i)

num = 9
for i in range(1, num + 1, 2):
    print(('*' * i).center(num))
for i in range(num - 2, 0, -2):
    print(('*' * i).center(num))

for i in range(1, 10):
    for j in range(1, i+1):
        print(j, '*', i, '=', j * i, '\t', end='')
    print()
